// 学生成绩勘误
import axios from "axios";

export default function (sessionId, account, description, oldUsualScore, oldExamScore, newUsualScore, newExamScore) {
    return axios({
        url: "/api/selections/errata",
        method: "post",
        header: {
            Authorization: localStorage.getItem("Authorization")
        },
        data: {
            sessionId,
            account,
            description,
            oldUsualScore,
            oldExamScore,
            newUsualScore,
            newExamScore,
        }
    }).then(res => {
        return {
            result: true,
            data: res.data
        }
    }).catch(error => {
        return {
            result: false,
            msg: error.response.data.msg
        }
    })
}